#ifndef CZENSOUND_H
#define CZENSOUND_H

#include "ZenEngine.h"
#include "dmusici.h"
#include "dsound.h"
#include "objbase.h"

class CZenSound
{
public:
	CZenSound();
	~CZenSound();
	HRESULT InitSound(HWND hWnd);
	HRESULT PlayBackgroundMusic(char* file);
	HRESULT StopBackgroundMusic();
	HRESULT ShutdownSound();
	HRESULT LoadZenSound(char* strFileName);
	HRESULT PlayZenSound();
	HRESULT StopZenSound();
	bool isPlayingZenSound();
	bool isPlayingBackground();

	char* getLoadedSound();
	
	void SetMusicOnBool(bool * musicOn){this->musicOn = musicOn;};
	void SetSoundOnBool(bool * soundOn){this->soundOn= soundOn;};
private:
	IDirectMusicPerformance8 * g_performance;
	IDirectMusicLoader8* g_loader;
	IDirectMusicSegment8* g_segment;
	IDirectMusicSegment8* g_segmentBGMusic;
	bool * musicOn;
	bool * soundOn;

	char* fileName;

	bool						bFilterActive;
};

#endif